import Qt 4.7

Rectangle {
    width: 800
    height: 430
    color: "#ffffff"

    Image {
        id: image1
        fillMode: Image.PreserveAspectCrop
        anchors.fill: parent
        source: "background.png"

        Text {
            id: text1
            x: 360
            y: 26
            width: 80
            height: 20
            color: "#cee007"
            text: "Welcome to"
            styleColor: "#20f51c"
            font.family: "Nimbus Mono L"
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignTop
            font.bold: true
            font.pixelSize: 66
        }

        Text {
            id: text2
            x: 279
            y: 103
            width: 80
            height: 20
            color: "#f95908"
            text: "qmap"
            font.bold: true
            font.pixelSize: 77
        }
    }

    ListModel{  //数据模型

        id:listModel

        ListElement{icon:"qbusmap.png"; file:"browser.qml"}

        ListElement{icon:"qosmmap.png"; file:"osm"}

        ListElement{icon:"qdrivemap.png"; file:"qdrivemap.qml"}

        ListElement{icon:"meego_0.jpg"}

    }

    Component{     //代理

        id:delegate

        Item{ id:wrapper; width:100; height:100

            scale:PathView.scale; opacity:PathView.opacity

            Column{

                Image
                {
                    source:icon;width:100;height:100
                    MouseArea
                    {
                        anchors.fill:parent
                        onClicked:
                        {
                            if (file == "browser.qml")
                            {
                                mainApp.toBusmap();
                            }
                            else if (file == "qdrivemap.qml")
                            {
                                mainApp.toDrivemap();
                            }
                            else if (file == "osm")
                            {
                                mainApp.toOsmmap();
                            }
                            console.log("fuck....");
                        }
                    }
                }

            }

        }

    }

    PathView{
        //路径视图

        anchors.fill:parent; model:listModel; delegate:delegate

        path:Path {
            startX:400;startY:300

            PathAttribute{name:"scale";value:2.0}
            PathAttribute{name:"opacity";value:1.0}

            PathQuad{x:400;y:-200;controlX:1100;controlY:-50}

            PathAttribute{name:"scale";value:0.1}
            PathAttribute{name:"opacity";value:0.5}

            PathQuad{x:400;y:300;controlX:-300;controlY:-50}

        }

    }


}
